From: Joey Hess Date: Fri, 21 Feb 2025 19:34:23 +0000 (-0400) Subject: fix build with old bytestring X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~6^2~140 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22Program/%22http:/www.example.com/cgi/%22https:/%22Program?a=commitdiff_plain;h=c86142e22b85c8cd6d51ee96faa8e3251a7cb524;p=git-annex.git fix build with old bytestring bytestring-0.11.3.0 is the first to have ShortByteString singleton. Unsure about what version added concat, but mconcat = concat. --- diff --git a/Annex/Locations.hs b/Annex/Locations.hs index 77b761b6de..7cc52d9688 100644 --- a/Annex/Locations.hs +++ b/Annex/Locations.hs @@ -745,7 +745,7 @@ keyFile :: Key -> OsPath keyFile k = let b = serializeKey'' k in toOsPath $ if SB.any (`elem` needesc) b - then SB.concat $ map esc (SB.unpack b) + then mconcat $ map esc (SB.unpack b) else b where esc w = case chr (fromIntegral w) of @@ -753,7 +753,7 @@ keyFile k = '%' -> "&s" ':' -> "&c" '/' -> "%" - _ -> SB.singleton w + _ -> SB.pack [w] needesc = map (fromIntegral . ord) ['&', '%', ':', '/']